package com.excilys.formation.project.entities;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Types d'opérations bancaires possibles.
 * 
 * @author excilys
 * 
 */
@Entity
@Table(uniqueConstraints = { @UniqueConstraint(columnNames = { "libelle" }) })
public class TypeOperation {
    /**
     * Opérations bancaires.
     */
    private int id;

    private String libelle;

    public TypeOperation() {
    }

    public TypeOperation(String type) {
        this.libelle = type;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getLibelle() {
        return libelle;
    }

    public void setLibelle(String libelle) {
        this.libelle = libelle;
    }

}
